/*! lzf */

$(document).ready(function () {
    $(document).on('click','.icon-trash',function(t){
        var a = $(this).attr("id");
            l = "确定要取消收藏该楼盘吗？";
        "apart" == c && (l = "确定要取消收藏该房源吗？"), dialog({
            title: "取消收藏",
            width: 400,
            height: 60,
            content: l,
            button: [{
                value: "确定", callback: function (t) {
                    $.ajax({
                        url: "/retPersonage/deleteZhuantai",
                        type: "POST",
                        data:{"id":a},
                        dataType: "JSON",
                        success: function (data) {
                            if(data == "0"){
                                window.location = "/retPersonage/favorite";
                            }else{
                                layer.msg("取消收藏失败", {
                                    time: 3000,
                                    icon: 10
                                });
                            }
                        }
                    })
                }, autofocus: !0
            }, {value: "取消"}]
        }).show(), t.stopPropagation()
    })
});